<template>
  <div id="app">
    <m-header :seller="seller"></m-header>
    <div class="tab border-1px">
      <div class="tab-item">
        <router-link to="/goods">商品</router-link>
      </div>
      <div class="tab-item">
        <router-link to="/ratings">评价</router-link>
      </div>
      <div class="tab-item">
        <router-link to="/seller">商家</router-link>
      </div>
    </div>
    <router-view/>
  </div>
</template>

<script>
import mHeader from './components/header/header'
import dataJson from '../data.json'

export default {
  name: 'App',
  data() {
    return {
      seller: dataJson.seller
    }
  },
  components: {
    mHeader
  }
}
</script>

<style lang="less">
#app {
  .tab {
    display: flex;
    height: 40px;
    width: 100%;
    flex-direction: row;
    justify-content: center;
    line-height: 40px;
    .tab-item {
      flex: 1;
      height: 100%;
      text-align: center;
      a {
        display: block;
        font-size: 14px;
        color: #333333;
        &.router-link-active {
          color: red;
          font-size: 16px
        }
      }
    }
  }
}
</style>
